package com.neusoft.ch7.staticdemo;

public class Person {

	// 非静态语句块
	{
		System.out.println("person的非静态语句块");
	}

	// person中的静态语句块
	static {
		System.out.println("person的静态语句块");
	}

	public Person() {
		super();

		System.out.println("父类person类的默认构造方法");
	}

	private String perName;
	private int age;

	/**
	 * 睡觉行为
	 */
	public void sleep() {
		System.out.println("person is sleeping...");
	}

	/**
	 * 饮食行为
	 */
	public static void eat() {
		System.out.println("person is eating...");
	}

	public String getPerName() {
		return perName;
	}

	public void setPerName(String perName) {
		this.perName = perName;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

}
